Location: SLC transporters @ a70688f8c9b0 / Facilitated transporter / CellMLV2 / GLUT1_ss_oi_no_constraint.py

Author:
Weiwei Ai <wai484@aucklanduni.ac.nz>
Date:
2024-04-03 14:25:12+13:00
Desc:
Add volume factor for full BG params and re-run the simulation
Permanent Source URI:
http://models.cellml.org/workspace/b65/rawfile/a70688f8c9b0f3e6f14c008fb76adfbb445b095c/Facilitated transporter/CellMLV2/GLUT1_ss_oi_no_constraint.py

# The content of this file was generated using the Python profile of libCellML 0.5.0.

from enum import Enum
from math import *


__version__ = "0.4.0"
LIBCELLML_VERSION = "0.5.0"

STATE_COUNT = 1
VARIABLE_COUNT = 45


class VariableType(Enum):
    VARIABLE_OF_INTEGRATION = 0
    STATE = 1
    CONSTANT = 2
    COMPUTED_CONSTANT = 3
    ALGEBRAIC = 4


VOI_INFO = {"name": "t", "units": "second", "component": "params_BG", "type": VariableType.VARIABLE_OF_INTEGRATION}

STATE_INFO = [
    {"name": "g_o", "units": "mM", "component": "params_BG", "type": VariableType.STATE}
]

VARIABLE_INFO = [
    {"name": "K_2", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "K_3", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "c", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "d", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "K_4", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "K_1", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "h", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "g", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "K_Ao", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "a", "units": "per_fmol_s", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "b", "units": "per_s", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "V_o", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "K_Ai", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "kappa_r1", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "kappa_r2", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "kappa_r3", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "kappa_r4", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "E", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "GC", "units": "uM", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "V_i", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "q_init_Ao", "units": "fmol", "component": "params_BG", "type": VariableType.ALGEBRAIC},
    {"name": "q_init_Ai", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "g_i", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "R", "units": "J_per_K_mol", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "T", "units": "kelvin", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "q_init_1", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "q_init_2", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "q_init_3", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "q_init_4", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "v_max_free", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "v_oi_max", "units": "mM_per_s", "component": "GLUT1_BG", "type": VariableType.CONSTANT},
    {"name": "V_i", "units": "pL", "component": "GLUT1_BG", "type": VariableType.CONSTANT},
    {"name": "k_m_1_free", "units": "dimensionless", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "k_oi_math", "units": "mM", "component": "GLUT1_BG", "type": VariableType.CONSTANT},
    {"name": "k_m_2_free", "units": "dimensionless", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "v_io_max", "units": "mM_per_s", "component": "GLUT1_BG", "type": VariableType.CONSTANT},
    {"name": "lambda", "units": "dimensionless", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "v_max", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "k_m_1", "units": "dimensionless", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "k_m_2", "units": "dimensionless", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "k_m_3", "units": "dimensionless", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "v", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
    {"name": "v_free", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
    {"name": "k_m_3_free", "units": "dimensionless", "component": "GLUT1_BG", "type": VariableType.CONSTANT},
    {"name": "k_io_math", "units": "mM", "component": "GLUT1_BG", "type": VariableType.CONSTANT}
]


def create_states_array():
    return [nan]*STATE_COUNT


def create_variables_array():
    return [nan]*VARIABLE_COUNT


def initialise_variables(states, rates, variables):
    variables[1] = 1.0e-5
    variables[2] = 1113.0
    variables[3] = 90.3
    variables[5] = 1.0e-6
    variables[6] = 0.726
    variables[7] = 12.1
    variables[9] = 1000.0
    variables[11] = 90.0
    variables[18] = 6.67
    variables[19] = 90.0
    variables[22] = 0.0
    variables[23] = 8.31
    variables[24] = 273.15
    variables[25] = 0.1501
    variables[26] = 0.1501
    variables[27] = 0.1501
    variables[28] = 0.1501
    variables[30] = 0.004839
    variables[31] = 90.0
    variables[33] = 0.1094
    variables[35] = 0.07117
    variables[43] = 218.96
    variables[44] = 1.609
    states[0] = 1.0e-8


def compute_computed_constants(variables):
    variables[0] = variables[1]*variables[2]/variables[3]
    variables[4] = variables[5]*variables[6]/variables[7]
    variables[8] = variables[0]/variables[5]*variables[9]/variables[10]
    variables[10] = 9.5*variables[11]*variables[9]
    variables[12] = variables[8]
    variables[13] = variables[6]/variables[4]
    variables[14] = variables[2]/variables[0]
    variables[15] = variables[10]/variables[0]
    variables[16] = 1.0*variables[15]
    variables[17] = variables[18]*variables[19]*1.0/1000.0
    variables[21] = variables[22]*variables[19]
    variables[29] = variables[30]*variables[31]/variables[32]
    variables[32] = variables[33]*variables[31]*variables[12]
    variables[34] = variables[35]*variables[31]/variables[29]
    variables[36] = variables[14]/variables[13]
    variables[37] = variables[17]*variables[14]*variables[1]/(variables[1]/variables[5]+variables[1]/variables[4])
    variables[38] = (variables[1]/variables[5]+variables[1]/variables[4])/(variables[1]/variables[0]+variables[36]*variables[1]/variables[4])
    variables[39] = (variables[1]/variables[5]+variables[1]/variables[4])/(1.0+variables[36]*variables[1]/variables[5])
    variables[40] = (variables[1]/variables[5]+variables[1]/variables[4])/(variables[36]*(1.0+variables[1]/variables[0]))


def compute_rates(voi, states, rates, variables):
    rates[0] = 1.0


def compute_variables(voi, states, rates, variables):
    variables[20] = states[0]*variables[11]
    variables[41] = variables[37]*(variables[8]*variables[20]-variables[12]*variables[21])/(1.0+variables[8]*variables[20]/variables[38]+variables[12]*variables[21]/variables[39]+variables[8]*variables[20]*variables[12]*variables[21]/variables[40])
    variables[42] = variables[29]*(variables[8]*variables[20]-variables[12]*variables[21])/(1.0+variables[8]*variables[20]/variables[32]+variables[12]*variables[21]/variables[34]+variables[8]*variables[20]*variables[12]*variables[21]/variables[43])